import store from "../store"

export function hasPermission(perms) {
  let hasPermission = false //决定按钮的禁用启用
  let permissions = store.getters.buttonList //某某js页面的变量，此变量包含所有权限集合
  for (let i = 0, len = permissions.length; i < len; i++) {
    if (permissions[i] == perms) { //permissions是否含有所传来的perms
      hasPermission = true //启用
      break
    }
  }
  return true
}
